import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)



export const constantRouterMap = [{
		path: '/login',
		name: 'login',
		component: () => import('@/views/user/userLogin'),
	},
	{
		path: "/",
		redirect: "/home"
	},
	{
		path: '/home',
		name: "home",
		meta: {
			keepAlive: true
		}, // 这里设置为true表示需要缓存
		component: () => import('@/views/index'),
	},
	{
		path: '/reg',
		name: 'reg',
		component: () => import('@/views/user/reg'),
	},
	{
		path: "/document",
		name: "document",
		component: () => import("@/views/mobile/components/DocumentPage"),
	},
	{
		path: "/recorde",
		name: "recorde",
		component: () => import("@/views/recorde/recordePage"),
	},
	{
		path: "/message",
		name: "message",
		component: () => import("@/components/LengMessage/index"),
	},
	{
		path: "/mobilemsg",
		name: "mobilemsg",
		component: () => import("@/views/mobile/components//pageMsgV"),
	},
	{
		path: "/mobileContacts",
		name: "mobileContacts",
		component: () => import("@/views/mobile/components/pageContacts/index"),
	},
	{
		path: "/mobileshowstate",
		name: "mobileshowstate",
		component: () => import("@/views/mobile/components/statePage/components/showV")
	}, {
		path: "/auditshow",
		name: "auditshow",
		component: () => import("@/views/mobile/components/users/audit/show")
	}, {
		path: "/audit",
		name: "audit",//审核
		component: () => import("@/views/mobile/components/users/audit/index")
	},
	{
		path: "/sensitiveWords",
		name: "sensitiveWords",
		component: () => import("@/views/mobile/components/users/audit/sensitiveWords")
	},
	{
		path: "/banned",
		name: "banned",
		component: () => import("@/views/mobile/components/users/banned")
	},
	{
		path: "/shsimDict",
		name: "shsimDict",
		component: () => import("@/views/mobile/components/dict/index")
	},
	{
		path: "/self",
		name: "self",
		component: () => import("@/views/mobile/components/users/self")
	},
	{
		path: '*',
		component: () => import('@/404'),
	},
]


export const asyncRouterMap = []


export default new Router({
	// mode: 'history', //后端支持可开
	scrollBehavior: () => ({
		y: 0
	}),
	routes: constantRouterMap
})